{% extends 'base.html' %}

{% block title %}
    发布问答
{% endblock title %}

{% block content %}
    <div class="row" style="margin-top: 20px;">
        <div class="col-2"></div>
        <div class="col-8 text-center">
            <h1>发布问答</h1>
            <form action="{{ url_for('qa.public_question') }}" method="post">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="请输入标题" name="title">
                </div>
                <div class="form-group">
                    <textarea class="form-control" placeholder="请输入内容" rows="10" name="content"></textarea>
                </div>
                <div class="form-group text-left">
                    {% for  msg in  get_flashed_messages() %} 
                        <div class="alert alert-danger alert-dismissible fade show" role="alert">
                            <strong>Tips:</strong> 
                            {{msg}}
                            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                            </button>
                        </div>  
                    {% endfor %}
                </div>
                <div class="form-group text-right">
                    <button class="btn btn-primary" type="submit" >发布</button>
                </div>
            </form>
        </div>
        <div class="col-2"></div>
    </div>
{% endblock content %}